/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nus.dataaccess.dao.reviewtemplate;

import com.nus.dataaccess.dao.base.BaseEntity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author robin.foe
 */

@Entity
@Table(name="REVIEW_TEMPLATE")
public class ReviewTemplate extends BaseEntity{
    
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Long id;
    public Long getId() {return id;}
    public void setId(Long id) {this.id = id;}
    @Override
    public Serializable getPk() {return this.getId();}
    
    @Column(name="CODE", length=10)
    private String code;
    public String getCode() {return code;}
    public void setCode(String code) {this.code = code;}

    @Column(name="DESCRIPTION")
    private String description;
    public String getDescription() {return description;}
    public void setDescription(String description) {this.description = description;}
    
    @OneToMany(mappedBy="reviewTemplate")
    private List<TemplateSection> templateSection = new ArrayList<TemplateSection>();
    public List<TemplateSection> getTemplateSection() {return templateSection;}
    public void setTemplateSection(List<TemplateSection> authors) {this.templateSection = templateSection;}
}
